package word;

import org.apache.poi.xwpf.usermodel.Document;

public class DocxPictureType {
  private int pictureType;
  private String mime;

  public DocxPictureType(int pictureType) {
    this.pictureType = pictureType;
    switch(pictureType) {
      case Document.PICTURE_TYPE_BMP:
        this.mime = "image/bmp";
        break;
      case Document.PICTURE_TYPE_EMF:
        this.mime = "image/x-emf";
        break;
      case Document.PICTURE_TYPE_GIF:
        this.mime = "image/gif";
        break;
      case Document.PICTURE_TYPE_JPEG:
        this.mime = "image/jpeg";
        break;
      case Document.PICTURE_TYPE_PICT:
        this.mime = "image/x-pict";
        break;
      case Document.PICTURE_TYPE_PNG:
        this.mime = "image/png";
        break;
      case Document.PICTURE_TYPE_TIFF:
        this.mime = "image/tiff";
        break;
      case Document.PICTURE_TYPE_WMF:
        this.mime = "image/x-wmf";
        break;
      case Document.PICTURE_TYPE_WPG:
        this.mime = "application/x-wpg";
        break;
      default:
        this.mime = "image/unknown";
        break;
    }
  }

  public String getMime() {
    return mime;
  }

  public int getPictureType() {
    return pictureType;
  }
}
